<?php

include('../../common.php');
if($_SESSION['log_islogin'] == 'yes' ){
	
	$id = intval(mysql_real_escape_string($_GET['trnID']));
	
	if($id == ""){
		$qList= "select * from transport  ";
		$rList = $db->sql_fetch($qList);

		$initvalue="[";
		$contentvalue="";
		foreach ($rList as $i) {
			$selected ="";
			if($subid != "" && $subid != null && $i['id']==$subid){
				$selected ="SELECTED";
			}
			$contentvalue = $contentvalue.'{"optionValue": "'.$i['trn_id'].'","optionSelected": "'.$selected.'", "optionDisplay": "'.$i['trn_plate_no'].'"},';
		}
		$contentvalue = substr($contentvalue,0,-1); 
		echo $initvalue.$contentvalue.']';		
	
	}else {
		$qList= "select * from transport where 1=1 AND trn_id='$id'  ";
		$rList = $db->sql_list($qList);
		$plateno = $rList['trn_plate_no'];
		$id = $rList['trn_id'];
		
		echo  $id.'-'.$plateno;
	}
}else{
	echo 'Dude!';
}

?>
